%1 start "" mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit
cd /d %~dp0

@REM 传参方式不行
@REM setx "%~1" "%~2" -M

@REM 用户环境变量设置(ok)
setx aaa1 bbb

@REM 系统环境变量设置(ok)
setx aaa2 bbb -M